package com.nulldev.util.threading.event;

import java.util.Date;

public abstract class EventImpl implements Event {
    
    private Object source;
    
    private int type;
    
    private Date date;
    
    protected EventImpl (Object source) {
        this(source, 0, new Date());
    }
    
    protected EventImpl (Object source, int type) {
        this(source, type, new Date());
    }
    
    protected EventImpl (Object source, int type, Date date) {
        this.source = source;
        this.type = type;
        this.date = date;
    }
    
    public int getType() {
        return type;
    }
    
    public Object getSource() {
        return source;
    }
    
    public Date getDate() {
        return date;
    }
}
